package com.resjz.milddog.Implement.order;

import cn.hutool.core.bean.BeanUtil;
import com.resjz.milddog.Interface.order.OrderInterface;
import com.resjz.milddog.entity.order.OrderEntity;
import com.resjz.milddog.service.order.OrderService;
import com.resjz.milddog.vo.order.OrderVo;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.apache.dubbo.config.annotation.Method;
import org.springframework.beans.factory.annotation.Autowired;
@Slf4j
@DubboService(version = "${dubbo.service.version}",methods ={@Method(name ="saveOrder",timeout = 10000,retries = 0)
        ,@Method(name = "getOrderById",timeout = 1000 ,retries = 0)} )
public class OrderInterfaceImpl implements OrderInterface {
    @Autowired
    private OrderService orderService;
    @Override
    public void saveOrder(OrderVo orderVo) {
        orderService.saveOrder(orderVo);
    }

    @Override
    public OrderVo getOrderById(Long orderId) {
        return orderService.getOrderByOrderId(orderId);
    }
}
